<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div>这是div1</div>
    <div>这是div2</div>
    <p>这是段落 1</p>
    <p>这是段落 2</p>

    <script>
        var t = document.querySelectorAll;
        var arr = [];
console.log(t.apply(document, ['div']));

        arr.push.apply(arr, document.querySelectorAll.apply(document, ['div']));
        arr.push.apply(arr, document.querySelectorAll.apply(document, ['p']));
        console.log(arr);

        for (var i = 0; i < arr.length; i++) {
            arr[i].style.border = '1px solid #f00';
        }
        var arr1 = [1,2,3,4];
        var arr3 = [2,3,4,5];
        var arr2 = arr1 + arr3;
        console.log(arr2);
        
    </script>
</body>

</html>